package com.panda.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.panda.entity.po.Article;
import com.panda.entity.vo.*;
import com.panda.utils.RespondResult;

import java.util.List;
import java.util.Map;

/**
 * (Article)表服务接口
 *
 * @author makejava
 * @since 2022-03-13 17:21:45
 */
public interface ArticleService extends IService<Article> {

    RespondResult<PageVo<ArticleListVo>> getAllArticles(Long id, Integer pageNum, Integer pageSize, Long categoryId, String keyword);

    RespondResult<ArticleDetailVo> getArticleDetail(Long id);

    RespondResult<ArticleVo> postArticle(ArticleVo articleVo);

    RespondResult<List<TopArticleVo>> getTopArticles();

    RespondResult deleteArticle(Long id);

    RespondResult<ArticleVo> modifyArticle(Long id, ArticleVo article);

    RespondResult createdArticleStatistic();

    RespondResult auditArticleTitleList(int pageNum);

    RespondResult auditArticleContent(Long id);

    RespondResult createdCategoryOfWeekStatistic(String categoryName);

    RespondResult articlePass(Long articleId);

    RespondResult articleNoPass(Long articleId);

    RespondResult searchArticle(String keyword, Long pageNum);

//    封装mapper自定义方法
    List<Map<String,String>> createArticleCount();
    List<Map<String,String>> createdCategoryOfWeek(String categoryName);

}

